#include <iostream>
#include <cstdio>
#include <vector>

using namespace std;

vector<int> v;

bool judge(int x)
{
    for(int i=0;i<v.size();i++) if(v[i]%x!=0)
        return false;
    return true;
}
int main()
{
    int n;
    cin>>n;
    v.push_back(n);
    for(int i=n-1;i>0;i--)
    {
        if(judge(i))
        {
            v.push_back(i);
            i=i/2+1;
        }
    }
    for(int i=0;i<v.size();i++)
        printf("%d ",v[i]);
    cout<<endl;
    return 0;
}
